﻿//
// IUserRepositoryContract.cs
//
// Authors:
//    Claus Jørgensen <10229@iha.dk>
//
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Diagnostics.Contracts;

namespace RSD.Data.Contracts
{
    /// <summary>
    /// IUserRepository code contract.
    /// </summary>
    [ContractClassFor(typeof(IUserRepository))]
    internal abstract class IUserRepositoryContract : IUserRepository
    {
        #region IUserRepository Members

        public User GetUserByNameAndPassword(string username, string password)
        {
            Contract.Requires(!string.IsNullOrEmpty(username));
            Contract.Requires(!string.IsNullOrEmpty(password));

            return default(User);
        }

        public User GenerateUser(string username, string password, string realname)
        {
            Contract.Requires(!string.IsNullOrEmpty(username));
            Contract.Requires(!string.IsNullOrEmpty(password));
            Contract.Requires(!string.IsNullOrEmpty(realname));
            Contract.Ensures(Contract.Result<User>() != null);

            return default(User);
        }

        #endregion

        #region IRepository<User> Members

        public IEnumerable<User> FindAll()
        {
            throw new NotImplementedException();
        }

        public IEnumerable<User> FindBy(System.Linq.Expressions.Expression<Func<User, bool>> predicate)
        {
            throw new NotImplementedException();
        }

        public IRepository<User> Add(User entity)
        {
            throw new NotImplementedException();
        }

        public IRepository<User> Remove(User entity)
        {
            throw new NotImplementedException();
        }

        public IRepository<User> SaveChanges()
        {
            throw new NotImplementedException();
        }

        #endregion

        #region IDisposable Members

        public void Dispose()
        {
            throw new NotImplementedException();
        }

        #endregion
    }
}
